﻿using System;
using System.Xml.Linq;

namespace HigLabo.Net.Twitter
{
    /// <summary>
    /// 
    /// </summary>
    public partial class TwitterClient
    {
        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        public AccountSettings GetAccountSettings()
        {
            String jsonText = this.GetResultText(TwitterApiUrl.Version1_1.Accounts.GetAccountSettingsUrl);
            return new AccountSettings(jsonText);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="includeEntities"></param>
        /// <param name="skipStatus"></param>
        /// <returns></returns>
        public User GetAccountVerifyCredentials(Boolean includeEntities, Boolean skipStatus)
        {
            var command = new GetAccountVerifyCredentialsCommand();
            command.IncludeEntities = includeEntities;
            command.SkipStatus = skipStatus;
            return GetAccountVerifyCredentials(command);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="command"></param>
        /// <returns></returns>
        public User GetAccountVerifyCredentials(GetAccountVerifyCredentialsCommand command)
        {
            String jsonText = this.GetResultText(TwitterApiUrl.Version1_1.Accounts.GetAccountVerifyCredentialsUrl, command);
            return new User(jsonText);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="command"></param>
        /// <returns></returns>
        public AccountSettings UpdateAccountSettings(UpdateAccountSettingsCommand command)
        {
            String jsonText = this.GetResultText(HttpMethodName.Post, TwitterApiUrl.Version1_1.Accounts.UpdateAccountSettingUrl, command);
            return new AccountSettings(jsonText);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="device"></param>
        /// <param name="includeEntities"></param>
        /// <returns></returns>
        public User UpdateDeliveryDevice(String device, Boolean includeEntities)
        {
            var command = new UpdateDeliveryDeviceCommand();
            command.Device = device;
            command.IncludeEntities = includeEntities;
            return UpdateDeliveryDevice(command);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="command"></param>
        /// <returns></returns>
        public User UpdateDeliveryDevice(UpdateDeliveryDeviceCommand command)
        {
            String jsonText = this.GetResultText(HttpMethodName.Post, TwitterApiUrl.Version1_1.Accounts.UpdateDeliveryDeviceUrl, command);
            return new User(jsonText);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="command"></param>
        /// <returns></returns>
        public User UpdateProfile(UpdateProfileCommand command)
        {
            String jsonText = this.GetResultText(HttpMethodName.Post, TwitterApiUrl.Version1_1.Accounts.UpdateProfileUrl, command);
            return new User(jsonText);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        public User UpdateProfileBackgroundImage()
        {
            return UpdateProfileBackgroundImage(null as UpdateProfileBackgroundImageCommand);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="command"></param>
        /// <returns></returns>
        public User UpdateProfileBackgroundImage(UpdateProfileBackgroundImageCommand command)
        {
            String jsonText = this.GetResultText(HttpMethodName.Post, TwitterApiUrl.Version1_1.Accounts.UpdateProfileBackgroundImageUrl, command);
            return new User(jsonText);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        public User UpdateProfileBackgroundColors()
        {
            return UpdateProfileBackgroundColors(null as UpdateProfileColorsCommand);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="command"></param>
        /// <returns></returns>
        public User UpdateProfileBackgroundColors(UpdateProfileColorsCommand command)
        {
            String jsonText = this.GetResultText(HttpMethodName.Post, TwitterApiUrl.Version1_1.Accounts.UpdateProfileColorsUrl, command);
            return new User(jsonText);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        public User UpdateProfileImage()
        {
            return UpdateProfileImage(null as UpdateProfileImageCommand);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <param name="command"></param>
        /// <returns></returns>
        public User UpdateProfileImage(UpdateProfileImageCommand command)
        {
            String jsonText = this.GetResultText(HttpMethodName.Post, TwitterApiUrl.Version1_1.Accounts.UpdateProfileImageUrl, command);
            return new User(jsonText);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        public User RemoveProfileBanner()
        {
            String jsonText = this.GetResultText(HttpMethodName.Post, TwitterApiUrl.Version1_1.Accounts.RemoveProfileBannerUrl);
            return new User(jsonText);
        }
        /// <summary>
        /// 
        /// </summary>
        /// <returns></returns>
        public User UpdateProfileBanner(UpdateProfileBannerCommand command)
        {
            String jsonText = this.GetResultText(HttpMethodName.Post, TwitterApiUrl.Version1_1.Accounts.UpdateProfileBannerUrl, command);
            return new User(jsonText);
        }

    }
}
